package com.qfedu.dao;

import com.qfedu.entity.Room;
import com.qfedu.pojos.Condition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoomDao {

    /**
     * 根据房源ID查询 房源信息
     * @param rid
     * @return
     */
    Room getRoomByRid(@Param("rid") Integer rid);


    /**
     * 根据城市Id查询房源
     * @param cid
     * @return  List<Room>
     */
    List<Room> selectRoomByCityId(@Param("cid") Integer cid);



    List<Room> selectRoomByCondition(@Param("cid") Integer cid,
                                     @Param("pcount") Integer pcount,
                                     @Param("maxPrice") Double maxPrice,
                                     @Param("minPrice") Double minPrice,
                                     @Param("leaseType") String leaseType,
                                     @Param("hid") Integer hid,
                                     @Param("grade") Double grade,
                                     @Param("start") Integer start,
                                     @Param("end") Integer end);

//    @Param("cid") Integer cid,
//    @Param("pcount") Integer pcount,
//    @Param(""),@Param(""),@Param(""),@Param(""),@Param("")
}
